package com.zb.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/8/22 0022
 **/
@Data
@ApiModel("产品Boom对象")
public class ProductBoomVo {
    @ApiModelProperty(value = "产品BoomID，新增不必传，修改必传")
    private Long id;

    @NotNull(message = "产品ID不能为空")
    @ApiModelProperty(value = "产品ID", required = true)
    private Long productId;

    @NotNull(message = "产品规格ID不能为空")
    @ApiModelProperty(value = "产品规格ID")
    private Long productSpecId;

    @Length(max = 500, message = "备注限制500个字符以内")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Valid
    @NotNull(message = "Boom子件不能为空，至少填写一项")
    @Size(min = 1, message = "Boom子件不能为空，至少填写一项")
    List<ProductBoomChildVo> boomChildVos;

    @ApiModelProperty(value = "删除Boom子件ID集合")
    List<Long> delBoomChildIds;


}
